﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace PedesTrainProject.Grid
{
    [Serializable()]
    public class Element : ISerializable
    {
        protected string name;
        protected string skin;

        public Element()
        {
        }

        #region Serialize
        public Element(SerializationInfo info, StreamingContext ctxt)
        {
            this.name = (string)info.GetValue("Name", typeof(string));
            this.skin = (string)info.GetValue("Skin", typeof(string));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("Name", this.name);
            info.AddValue("Skin", this.skin);
        }
        #endregion
    }
}
